class CreateBorrowBooks < ActiveRecord::Migration
  def self.up
    create_table :borrow_books do |t|
      t.string :code,:null => false,:limit => 10
      t.integer :user_id,:null => false
      t.integer :book_id,:null => false
      t.date :borrow_date,:null => false
      t.date :deadline_date,:null => false
      t.date :return_date

      t.timestamps
    end
  end
  def self.down
    drop_table :borrow_books
  end
end
